package com.baizhi.wd.view;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class SuccessView extends HttpServlet {
	public void service(HttpServletRequest request,HttpServletResponse response) throws IOException{
		try{
		//1.设置响应类型
		response.setContentType("text/html;charset=utf-8");
		//2.获取输出流
		PrintWriter out = response.getWriter();
		//3.使用输出流
		out.println("<html>");
		out.println("<title>项目1</title>");
		out.println("<body>");
		out.println("成功<br/>");
		out.println("登录信息是："+"<br/>"+request.getParameter("username")+"<br/>");
		out.println(request.getParameter("password")+"<br/>");
		out.println("<a href='/telbook_2/per/queryAllAction'>查所有</a>");
		out.println("</body>");
		out.println("</html>");
		}catch(Exception e){
			response.sendRedirect("/telbook_2/catchError.html");
			e.printStackTrace();
			}
	}
}
